package InterviewPractise.JAVAForSQL.dao;

import InterviewPractise.JAVAForSQL.Entity.Table1Entity;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Richard
 * Date: 5/20/11
 * Time: 10:35 AM
 * To change this template use File | Settings | File Templates.
 */
public class Field1Dao extends HibernateDaoSupport{
    public List<Table1Entity> findTable1(DetachedCriteria criteria , Integer firstResult,Integer maxResult){
        return getHibernateTemplate().findByCriteria(criteria,firstResult,maxResult) ;
    }

    public Table1Entity findTable1ById(Integer id){
        return getHibernateTemplate().get(Table1Entity.class,id);
    }
}
